import ChartAxisStyle=require('./item/ChartAxisStyle');
import FontStyle=require('./item/FontStyle');
import LineStyle=require('./item/LineStyle');
import ChartApperanceBase=require('./ChartApperanceBase');
import GCJ_CLASS_TYPE=require('./../../../common/GCJ_CLASS_TYPE');


export = ChartApperancePie;

/**
 * 饼状图的外观属性
 * @author 
 *
 */
class ChartApperancePie extends ChartApperanceBase {
    public an=0; // angle角度 [-180,180]
    
    public constructor(g?) {
        super(g);
        
        this.ct=GCJ_CLASS_TYPE.CLASS_TYPE_ChartApperancePie;
        
        this.initData();
    }
    
    // 初始化数据
    public initData() {
        super.initData();
    }
    
    // 从json对象(注意不是json字符串)中解析
    // 参数：self,true表示只拷贝自身数据，而不拷贝子的数据
    public fromJson(jsonObj,versionId,self?) {
        super.fromJson(jsonObj,versionId,self);

        this.an=jsonObj.an;        
    }
    // 转成json字符串
    public toJson(): string {
        // 去掉父json字符串的头尾
        var superJson=super.toJson();
        superJson=superJson.substr(1,superJson.length-2);

        var ret='{';
        ret+=superJson;
                    
        // an
        ret+=',';
        ret+='"an":';
        ret+=this.an;

        ret+='}';
        return ret;
    }
//SJG_MARK_APPEND--------------------
}//SJG_MARK_END-------------------------